<div id="employees_spinner" style="display:none;" class="spinner">
  <%=image_tag 'spinner.gif' %>
</div>
<div id="employees_folder" class="folder">
  <div class="search">
    <label>Haku</label>
    <%form_tag(employees_url, {:method => :get}) do%>
      <%=text_field_tag  :query %>
      <%=submit_tag "Hae", :name => ''%>
    <%end%>
  </div>
  <div class="vista_toolbar">
    <ul>
      <%= toolbar_add 'henkilö', 'employees'%>
      <%= toolbar_delete_selected 'employees' %>
    </ul>
  </div>
  <div class="container">
    <table>
      <tr>
        <th style="width:20em">
          Sukunimi
        </th>
        <th style="width:10em">
          Etunimi
        </th>
        <th>
          Matkapuhelin
        </th>
        <th>
          Sähköposti
        </th>
      </tr>
      <%for employee in @employees %>
        <tr>
          <td>
            <%=h employee.last_name %>
          </td>
          <td>
            <%=h employee.first_name %>
          </td>
          <td>
            <%if employee.mobile_work.blank?%>
              <%=h employee.mobile %>
            <%else%>
              <%=h employee.mobile_work %>
            <%end%>
          </td>
          <td>
            <%=h employee.email %>
          </td>
          <td>
            <%=icon_edit 'employees', employee %>
          </td>
          <td>
            <%=icon_delete 'employees', employee %>
          </td>
        </tr>
      <%end %>
    </table>
  </div>
</div>